package dao;

import entity.Goods;

import java.util.Collection;
import java.util.List;

/**
 * Created by asus on 2017/6/20.
 */
public interface GoodsDAO {
    /**
     * 获取总记录数
     * @return
     */
    public Integer getCount();

    /**
     * 通过id号获取商品
     * @param id
     * @return
     */
    public Goods findById(Long id);

    public Long save(final Goods goods);

    public Collection<Goods> findByIds(Collection<Long> ids);

    public Collection<Goods> findPage(int page, int size);

    public List<Goods> findAll();

    public void update(Goods goods) throws Exception;

    public void delete(Long id) throws Exception;
}
